<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title></title>
    <link rel="Stylesheet" href="css/analysis.css" />
    <script type="text/javascript">
        function init() {
            if (window.location.hash) {
                var parentDiv, nodes, i, helpInfo, helpId, helpInfoArr, helpEnvFilter, envContent, hideEnvClass, hideNodes;
                helpInfo = window.location.hash.substring(1);
                    if(helpInfo.indexOf("-")) {
                        helpInfoArr = helpInfo.split("-");
                        helpId = helpInfoArr[0];
                        helpEnvFilter = helpInfoArr[1];
                    }
                    else {
                        helpId = helpInfo;
                    }
                parentDiv = document.getElementById("topics");
                nodes = parentDiv.children;
                    hideEnvClass = (helpEnvFilter === "OnlineOnly"? "PortalOnly": "OnlineOnly");
                    if(document.getElementsByClassName) {
                        hideNodes = document.getElementsByClassName(hideEnvClass);
                    }
                    else {
                        hideNodes = document.querySelectorAll(hideEnvClass);
                    }
                for(i=0; i < nodes.length; i++) {
                    if(nodes[i].id !== helpId) {
                        nodes[i].style.display ="none";
                    }
                    }
                    for(i=0; i < hideNodes.length; i++) {
                        hideNodes[i].style.display ="none";
                    }
                }
            }
    </script>
</head>
<body onload="init()">
<div id="topics">
    <div id="toolDescription" class="regularsize">
        <h2>Join Features</h2><p/>
        <h2><img src="./images/GUID-2230E8B8-8956-475C-9C65-68A92359BB48-web.png" alt="Join Features"></h2>
        <hr/>
    <p>Join Features works with two
layers and   joins attributes from one
feature to another based on spatial and attribute
relationships. The tool determines all input features that meet the specified join conditions and appends the join layer to the target layer. 
    </p>
    <p>Join Features can be applied to points, lines, areas, and tables. A spatial join requires that your data has a geometry. 
    </p>
    <p>If  <b>Use current map extent</b> is checked, only the features visible within the current map extent will be analyzed.  If unchecked, all features in both the target layer and the join layer will be analyzed, even if they are outside the current map extent.
    </p>
    </div>
    <!--Parameter divs for each param-->
    <div id="targetLayer">
        <div><h2>Choose target layer</h2></div>
        <hr/>
        <div>
            <p>The target layer that will have attributes from the join layer appended to its table.
            </p>
            <p class="OnlineOnly">In addition to choosing a layer from your map, you can select  <b>Choose Living Atlas Analysis Layer</b> or <b>Choose  Analysis Layer</b> found at the bottom of the drop-down list. This opens a gallery containing a collection of layers useful for many analyses. 
            </p> 
        </div>
    </div>
    <div id="joinLayer">
        <div><h2>Choose layer to join to target layer</h2></div>
        <hr/>
        <div>
            <p>The  join  layer   with the attributes that will be appended to the target  layer.
            </p>
            <p class="OnlineOnly">In addition to choosing a layer from your map, you can select  <b>Choose Living Atlas Analysis Layer</b> or <b>Choose  Analysis Layer</b> found at the bottom of the drop-down list. This opens a gallery containing a collection of layers useful for many analyses. 
            </p>
        </div>
    </div>
    <div id="joinType">
        <div><h2>Select the type(s) of join</h2></div>
        <hr/>
        <div>
            <p>You can apply  a spatial join, an attribute   join, or a combination of the two. 
                <ul>
                    <li> <b>Spatial</b>&mdash;Uses a specified spatial relationship to join features. This requires that both layers have a geometry.
                    </li>
                    <li> <b>Attribute</b>&mdash;Joins features based on equal fields.
                    </li>
                </ul>
                
            </p>
            <p>
            </p>
        </div>
    </div>
    <div id="spatialRelationship">
        <div><h2>Choose a spatial relationship</h2></div>
        <hr/>
        <div>
            <p>The spatial relationship that will determine if features are joined to each other. The available relationships will depend on the type of geometry (point, line, areas) being used as the input features. The available relationships include the following:
                <ul>
                    <li> <b>Identical to</b>&mdash;The features in the target layer will be matched if they are identical to features in the join layer.
                    </li>
                    <li> <b>Intersects</b>&mdash;The features in the target layer  will be matched if they intersect features in the join layer.
                    </li>
                    <li> <b>Completely contains</b>&mdash;The features will be matched if the features in the target layer  completely contain features in the join layer.
                    </li>
                    <li> <b>Completely within</b>&mdash;The features will be matched if the features in the target layer are  completely within features of the join layer.
                    </li>
                    <li> <b>Within a distance of</b>&mdash;The features in the target layer will be matched if they are within a specified distance of features in the join layer.
                    </li>
                </ul>
                
            </p>
        </div>
    </div>
    <div id="attributeRelationship">
        <div><h2>Attribute join</h2></div>
        <hr/>
        <div>
            <p>The attribute relationship that will determine if features are joined to each other. Features are matched when the field values in the join layer are equal to field values in the target layer. 
            </p>
            <p>For example, suppose you have a countywide geographic layer of residential addresses (including a field  <i>ZIP</i>) and a tabular dataset of health demographics by ZIP Code (including a field named <i>HEALTHZIP</i>). You can join the health dataset to the residential data by matching the field <i>ZIP</i> to <i>HEALTHZIP</i>, which will result in a layer of residences with the corresponding health data.
            </p>
        </div>
    </div>
    <div id="joinOperation">
        <div><h2>Choose join operation</h2></div>
        <hr/>
        <div>
            <p>Determines how joins between the target and join  layer will be handled if multiple  features in the join layer are found to have the same relationship to the target layer. The following are the two join operations from which to choose:
                <ul>
                    <li> <b>Join one to one</b>&mdash;This option joins the first matching feature in the join layer to the first matching feature in the target layer.  Optionally, if statistics are added, matched joined features will be summarized to each feature in the target layer.  The count of joined features will be added by default.
                    </li>
                    <li> <b>Join one to many</b>&mdash;This option joins all the matching features in the join layer to the target layer.  The result layer will contain multiple records of the target feature.
                    </li>
                </ul>
                
            </p>
            <p>For example, suppose you want to find supermarkets within 5 kilometers of a farmers market.   In this case, the layer being joined to has a single feature representing a farmers market, and the joining features represents the local grocery stores that have attributes such as total annual sales. Using the  <b>Join Features</b> tool, you find that five grocery stores meet that criteria. If you specify a join operation of <b>Join one to many</b>, you will end up with five features in your result, each row representing the farmers market and a supermarket. If you specify a <b>Join one to one</b> relationship and select a statistic, you will end up with one feature representing the farmers market and the summarized information from the supermarkets, such as the count (5), and other optional statistics such as the sum of annual sales.
            </p>
        </div>
    </div>
    <div id="summaryFields">
        <div><h2>Add statistics (optional)</h2></div>
        <hr/>
        <div>
            <p>If a  <b>Join one to one</b> option is selected, for numeric fields, you can summarize and calculate statistics on joined features.   By default, the count of matching join features will  be calculated and added to the result layer.  If you choose  not to add additional statistics, the first matching feature in the join layer will be joined to the first matching feature in the target layer.   You can calculate one or more of the following:
            </p>
            <ul>
                <li>Sum
                </li>
                <li>Minimum
                </li>
                <li>Maximum
                </li>
                <li>Average
                </li>
                <li>Standard Deviation
                </li>
            </ul>
            
            <p> 
            </p>
        </div>
    </div>
    <div id="outputName">
        <div><h2>Result layer name</h2></div>
        <hr/>
        <div>
            <p>This is the name of the layer that will be created in  <b>My Content</b>  and added to the map.  The default  name is based on the tool name and the input layer name. If the layer already exists, you will be asked to provide another name.
            </p>
            <p>Using the  <b>Save result in</b> drop-down box, you can  specify the name of a folder in <b>My Content</b> where the result will be saved.
            </p>
        </div>
    </div>
</div>
</html>
